package com.hdit.common;
import java.io.IOException;
import java.lang.reflect.Method;

import javax.annotation.Resource;
import javax.servlet.ServletContext;

import org.springframework.beans.factory.InitializingBean;

import sun.misc.BASE64Decoder;

/**
 * 初始化
 * ============================================================================
 */

public class Initializing implements InitializingBean {
	
	private String keyFile = "key";
	
	@Resource
	private ServletContext servletContext;

	@Override
	public void afterPropertiesSet() throws Exception {
		if (servletContext != null) {

		}
	}

	public String getKeyFile() {
		return keyFile;
	}

	public void setKeyFile(String keyFile) {
		this.keyFile = keyFile;
	}
	
	public static void main(String args[]) throws IOException{
		
		BASE64Decoder bASE64Decoder = new BASE64Decoder();
		
		System.out.println(new String(bASE64Decoder.decodeBuffer("U0hPUFhYX0tFWQ==")));
		
		System.out.println(new String(bASE64Decoder.decodeBuffer("c2hvcHh4LnR4dA==")));
		
	}

}